import {LoginInfoLogQuery, LoginInfoPageResult} from "./types";
import {AxiosPromise} from "axios";
import request from "@/utils/request";

export function listLogs(queryParams?: LoginInfoLogQuery): AxiosPromise<LoginInfoPageResult> {
  return request({
    url: "/api/v1/logs/login/page",
    method: "get",
    params: queryParams,
  });
}

export function exportLog(queryParams: LoginInfoLogQuery) {
  return request({
    url: "/api/v1/logs/login/export",
    method: "get",
    params: queryParams,
    responseType: "arraybuffer",
  });
}
